package com.ssm.service;

import com.ssm.dao.UserMapper;
import com.ssm.pojo.User;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: Cat.Sir
 * Description:
 * DateTime: 2022-04-30 20:43
 */
public class UserServiceImpl implements UserService{

    private UserMapper userMapper;

    public void setUserMapper(UserMapper userMapper) {
        this.userMapper = userMapper;
    }

    @Override
    public int addUser(User user) {
        return userMapper.addUser(user);
    }

    @Override
    public int updateSelfInfo(User user) {
        return userMapper.updateSelfInfo(user);
    }

    @Override
    public int updateUserInfo(User user) {
        return userMapper.updateUserInfo(user);
    }

    @Override
    public User queryInfoByName(String uName) {
        return userMapper.queryInfoByName(uName);
    }

    @Override
    public List<User> queryAllInfo() {
        return userMapper.queryAllInfo();
    }

    @Override
    public int updateUserPwdById(User user) {
        return userMapper.updateUserPwdById(user);
    }
}
